import axios from "axios";

const request = axios.create({
  baseURL: 'http://127.0.0.1:7001'
})

// 拦截器
request.interceptors.request.use((req) => {
  let token = localStorage.getItem('token')
  if(token){
    req.headers.token = token
  }
  return req
})

export default request